home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
c80tcog.lbr
/
PUTGET.C
< prev
next >
Wrap
Text File
|
1985-08-09
|
896b
|
47 lines
/*
Kernighan & Ritchie, "The C Programming
Language", Prentice-Hall, Inc. Englewood Cliffs, NJ
1978, p. 155.
submitted by William G. Hutchison, Jr.
P.O. Box 278
Exton, PA 19341-0278
U.S.A.
CompuServe 70665,1307
*/
#define MAXLINE 1000 /* maximum input line size */
#include "gets.c"
#define MAINLY
#ifdef MAINLY
#else
#endif
/* puts - put a string to stdout, appending a newline at the end */
puts(s) char *s;
{
while (*s) putchar(*s++);
putchar(NEWLINE);
}
/* end puts */
/* fputs - copy string s to output stream */
fputs(s, stream) char *s;
FILE *stream;
{
while(*s) putc(*s++, stream);
} /* end fputs */
main() /* test driver: copy input lines to standard output */
{
char L[MAXLINE];
char *s;
while ((s= gets(L, MAXLINE)) != NULL)
puts(L);
} /* end main */